package cn.edu.xmu.oomall.customer.mapper.openfeign;

import cn.edu.xmu.javaee.core.model.InternalReturnObject;
import cn.edu.xmu.oomall.customer.mapper.openfeign.Po.CouponAct;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Suave
 * @date 2024/12/20
 */
@FeignClient(value = "product-service")
public interface ProductMapper {
    @GetMapping("/couponactivities/{id}")
    InternalReturnObject<CouponAct> findCouponActById(@PathVariable Long id);

    @PutMapping("/shops/{shopId}/couponactivities/{id}")
    InternalReturnObject putCouponActProduct(@PathVariable Long shopId,
                                     @PathVariable Long id,
                                     @Validated @RequestBody CouponAct couponAct);
}
